package com.mer.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @program: IIPhase-project
 * @description: 课程
 * @author: 陈铠
 * @create: 2021-10-20 16:56
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("edu_course")
@ApiModel(value = "course实体类",description = "课程")
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private String subjectName;

    @ApiModelProperty(value = "课程ID")
    @TableId(type = IdType.ASSIGN_ID )
    private String id;

    @ApiModelProperty(value = "课程讲师ID")
    private String teacherId;

    @ApiModelProperty(value = "课程专业ID")
    private String subjectId;

    @ApiModelProperty(value = "课程专业父级ID")
    private String subjectParentId;

    @ApiModelProperty(value = "课程标题")
    private String title;

    @ApiModelProperty(value = "课程销售价格，设置为0则可免费观看")
    private BigDecimal price;

    @ApiModelProperty(value = "总课时")
    private Integer lessonNum;

    @ApiModelProperty(value = "课程封面图片路径")
    private String cover;

    @ApiModelProperty(value = "销售数量")
    private Long buyCount;

    @ApiModelProperty(value = "浏览数量")
    private Long viewCount;

    @ApiModelProperty(value = "乐观锁")
    private Long version;

    @ApiModelProperty(value = "课程状态 Draft未发布  Normal已发布")
    private String status;

    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private String gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String gmtModified;

    @ApiModelProperty(value = "课程备注")
    private String remark;

    @ApiModelProperty(value = "是否添加 0 否，1 是")
    private Integer isAdd;

    @ApiModelProperty(value = "课程审核状态：0不通过；1通过；2待审核")
    @TableField(exist = false)
    private Integer checkStatus;

    @ApiModelProperty(value = "课程审核驳回原因")
    @TableField(exist = false)
    private String checkContent;

    @ApiModelProperty(value = "课程简介")
    @TableField(exist = false)
    private String description;
















}
